package com.gylang.im.user.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.gylang.commons.constant.RegexConstant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @author gylang
 * data 2020/9/4
 * @version v0.0.1
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MemberUserDTO extends PtUserDTO {

    @JSONField(format = "YYYY-mm-dd")
    private Date birthday;

    /**
     * 兴趣
     */
    private String hobby;
    /**
     * 性别
     * MF未知 M男 F女
     */
    @Pattern(regexp = RegexConstant.SEX, message = "性别格式不正确")
    private String sex;

    /**
     * 证件号码
     */
    @NotEmpty(message = "证件号码不能为空")
    private String certNo;
    /**
     * 姓名
     */
    @NotEmpty(message = "姓名不能为空")
    private String name;
    /**
     * 证件号码
     */
    @NotEmpty(message = "证件类型不能为空")
    private String certType;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 个人签名
     */
    @Size(max = 256, message = "个人签名不能超过256个字")
    private String signature;

}
